package com.xunk.equipment.influxdb.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.influxdb.annotation.Column;
import org.influxdb.annotation.Measurement;

import java.io.Serializable;
import java.time.Instant;

/**
 * @ProjectName: xunk
 * @Package: com.xunk.equipment.influxdb.entity
 * @ClassName: WaterAndHeatInfluxEntity
 * @Author: dongxiaoxin
 * @Description: 水暖时序数据
 * @Date: 2021/3/29 14:55
 * @Version: 1.0
 */
@Measurement(name = "water_tb", database = "paramter_db", retentionPolicy = "default")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class WaterFlowmeterEntity implements Serializable {

    // 社区/家庭id
    @Column(name = "home_id", tag = true)
    private String homeId;

    @Column(name = "total")
    private String total;

    @Column(name = "time")
    private Instant time;

    public WaterFlowmeterEntity(String homeId, String total) {
        this.homeId = homeId;
        this.total = total;
    }
}
